/*
 * AjLog - The AspectJ based Logging Facade
 *
 * Copyright (C) 2009 - 2010, the original author or authors.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.ajlog.annotations.levels;

import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;


/**
 * SeverityLevelAnnotation is the base annotation. Any annotation marked with this
 * annotation will be recognized by AjLog as a severity level. 
 * <br><br>
 * Notice: To be used by Application programmers only if extending the basic set of severity levels, called
 * <i>Customized Logging Level</i>. This could be useful to express more severity levels which are quite 
 * common to the application and make the logging method and it's message more expressive.
 * <br><br>
 * Example:<br><br>
 * <pre>
 * package myproject.loglevels;
 * 
 * import java.lang.annotation.ElementType;
 * import java.lang.annotation.Retention;
 * import java.lang.annotation.RetentionPolicy;
 * import java.lang.annotation.Target;
 * import java.lang.annotation.Documented;
 * 
 * import org.ajlog.annotations.levels.*;
 * 
 * &#64;Retention(RetentionPolicy.RUNTIME)
 * &#64;Target(ElementType.METHOD)
 * &#64;Documented
 * &#64;SeverityLevelAnnotation(text = "NOT-THAT-SEVERE", severityLevel = SeverityLevels.SEVERE-20, filterLevel = FilterLevel.ERROR)
 * public &#64;interface NotThatServere {
 *   String value() default "";
 * }
 * </pre>
 * 
 *
 * @author Marko Umek
 * 
 * @see Info
 * @see Warning 
 * @see Error
 * @see Severe
 * @see Fatal
 *
 */
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.ANNOTATION_TYPE)
@Documented
public @interface SeverityLevelAnnotation {
    /**
     * The severity level as integer value.
     */
    int         severityLevel();

    /**
     * The associated text value to the severity level. INFO, ERROR, ...
     */
    String        text();
    
    /**
     * The associated filter level
     */
    FilterLevel filterLevel();
}
